home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / print / printdoc.zip / PRINTDOC.DOC < prev    next >
Text File  |  1988-04-23  |  16KB  |  322 lines

  1.  
  2.  
  3.  
  4.                                   ------------
  5. ----------------------------------> PRINTDOC <----------------------------------
  6. ----------------------------------> (v. 2.1) <----------------------------------
  7.                                   ------------
  8.  
  9.                                    written by
  10.  
  11.                                 Phillip Garding
  12.                              663 E. Mansfield Ave.
  13.                            Salt Lake City, UT  84105
  14.  
  15.            u-pgardi@sunset.utah.edu.UUCP or utah-cs!utah-ug!u-pgardi
  16.  
  17. ---------------------------->>Statement of purpose<<----------------------------
  18.  
  19.     Printdoc is a utility for printing text files on both sides of
  20. sheets of paper.  Gone will be the days of using 64 sheets of paper to
  21. print a 64 page manual; now it will consume only 32 sheets.  The
  22. mechanism used is to print all of the odd numbered pages on the printer,
  23. and save the even-numbered pages to a file, pause, allowing the operator 
  24. to remove the paper, turn it over, and then print the even-numbered pages 
  25. on the back sides.  In addition, Printdoc also has the ability to insert 
  26. page breaks (headers and footers) into a long text file that would otherwise 
  27. print out as a continuous sheet of text. The operation of Printdoc can be 
  28. modified to accomodate any length sheets of paper, although the default 
  29. value is the standard 8 1/2 x 11 size.
  30.       For best results, use an older ribbon, since new ribbons usually
  31. print an image dark enough to show through to the other side of the paper
  32. and to obscure text that may be printed there.  If it is important to have 
  33. a dark copy, use a heavy stock paper that won't let the print show through.
  34.     It is essential to preview the file on the screen before printing, 
  35. so that the parameters may be correctly set, and anomalies such as title
  36. pages, etc. can be planned for.  To know more, keep reading . . .
  37.  
  38.  
  39. ------------------------>>Requirements and assumptions<<------------------------
  40.  
  41. Printdoc requires that:     
  42.     - there is space in the current directory equivalent to at least
  43.         one-half of the size of the text file to be printed
  44.      - the source file must be ascii
  45.     - all lines of text are terminated by a "new-line character" (CR)
  46.         (i.e. the end-of-file marker must not be on the same
  47.                line as text)
  48.     - no file by the name of "---hi---.you" can exist in the current
  49.         directory (why would you have a file with a name like
  50.         this anyway?), since the even-numbered pages are stored in
  51.         a created file of this name.
  52.  
  53.  
  54. --------------------------------->>Invocation<<---------------------------------
  55.  
  56.     Printdoc can be invoked with the name "printdoc", and the file
  57. to be printed can be given as a command line parameter.     
  58.     For example: "printdoc manual.txt". 
  59. If the file is not specified on the command line, printdoc will prompt
  60. for the name of the file.  The filename string cannot be longer than 64
  61. characters, and can include a path, as well as the file name.  
  62.     For example: "printdoc c:\swamp\land\sales\howto.doc".  
  63.  
  64.  
  65. ---------------------------------->>Options<<-----------------------------------
  66.  
  67.     When Printdoc is run, after the filename has been recognized,
  68. and the file found and opened, you will be asked if you would like to
  69. view and/or change the parameter settings.  A response of 0 will accept 
  70. the default settings, but by responding 1 to this query, a menu showing 
  71. the four settings and their default values will be shown.  Choosing the 
  72. number to the left of a parameter will allow you to read a description 
  73. of that parameter's function and allow you to change its value.  The 
  74. various parameters are discussed below.
  75.  
  76.    *-**-***-*****-********-*************-*********************-**************...
  77.     Parameter:          page size
  78.     Default setting:        66 
  79.  
  80.     Description:        The page size is the number of lines that
  81.                 can be printed on one page.  For a standard
  82.                 8 1/2 x 11 inch sheet, this is 66 (the 
  83.                 default).  For a legal sized sheet of paper,
  84.                 8 1/2 x 14 inches, the value is 84.  To
  85.                 calculate the number of lines for an 
  86.                 arbitrary size sheet, multiply the length in
  87.                 inches by 6.
  88.  
  89.     Setting Options:        new value, or enter 0 for default (66).
  90.    *-**-***-*****-********-*************-*********************-**************...
  91.     Parameter:        line width.
  92.     Default setting:        80
  93.  
  94.     Description:        The line width is the maximum number of char-
  95.                 acters that will be read by printdoc for one
  96.                 line.  If the document has lines greater than
  97.                 80 characters, this parameter must be set to 
  98.                 the GREATEST EXPECTED value.  Note: this value
  99.                 does not include the CR at the end of the line.
  100.  
  101.     Setting Options:        new value, or enter 0 for default (80).
  102.    *-**-***-*****-********-*************-*********************-**************...
  103.     Parameter:        text mode
  104.     Default setting:        pica
  105.  
  106.     Description:        The text can be printed on the printer in a 
  107.                 variety of pitches.  The codes used are 
  108.                 standard Epson/IBM printer codes.  Pitches/
  109.                 modes available are pica, elite, condensed,
  110.                 near-letter quality (on my STAR, this is
  111.                 always 10 char/inch, but may vary on other
  112.                 printers), and custom.  For the case of custom 
  113.                 text mode, the user enters the decimal values 
  114.                 of the printer codes he/she wishes to send to 
  115.                 the printer.  CHOOSING ELITE AND CONDENSED WILL
  116.                 CHANGE THE SIZE OF THE LEFT MARGIN.  It is
  117.                 assumed that a margin is desired (for hole-
  118.                 punching, etc.); elite and condensed set the
  119.                 left margin for 1 inch.  If this is not desired,
  120.                 it is necessary to reset the left margin 
  121.                 parameter after selecting the text mode.
  122.  
  123.     Setting Options:        1.  pica (10 char/inch)        ESC - P
  124.                 2.  elite (12 char/inch)    ESC - M
  125.                 3.  condensed (17 char/inch)    ESC - <SI>
  126.                 4.  near-letter quality on    ESC - x - 1 
  127.                             (off    ESC - x - 0)
  128.                 5.  custom
  129.    *-**-***-*****-********-*************-*********************-**************...
  130.     Parameter:        printer device.
  131.     Default setting:        prn.
  132.  
  133.     Description:        This is the dos device name to which your 
  134.                 printer is assigned.
  135.  
  136.     Setting Options:        1.  prn
  137.                 2.  lpt1
  138.                 3.  lpt2
  139.    *-**-***-*****-********-*************-*********************-**************...
  140.     Parameter:        Left margin.
  141.     Default setting:        0
  142.  
  143.     Description:        This is the size of the left margin INSERTED
  144.                 by printdoc.  This value does not include any
  145.                 margin that may be built into the document to
  146.                 print.  Note: selecting a text mode of elite
  147.                 or condensed will cause this value to be set
  148.                 to a one-inch margin (12 for elite, 17 for
  149.                 condensed.  If this is not the size margin
  150.                 desired for one of those pitches, it is 
  151.                 necessary to choose the text mode, then reset
  152.                 the left margin value.
  153.  
  154.     Setting Options:        New value, or 0 for current value.
  155.    *-**-***-*****-********-*************-*********************-**************...
  156.     Parameter:          Page breaks
  157.     Default setting:        yes
  158.     
  159.     Description:        A page break is a set of blank lines used to
  160.                 separate one page from another, and to put a
  161.                 margin at the top and bottom of a page of
  162.                 print.  The page break parameter tells 
  163.                 Printdoc whether the source file has blank 
  164.                 lines in it already, or whether Printdoc must
  165.                 put in headers and footers for each page.
  166.                 In the default case, Printdoc IS EXPECTING
  167.                 page breaks to already exist.  If the default
  168.                 setting is changed to no, then Printdoc will
  169.                 print blank lines at the top of each page,
  170.                 count and print the number of lines of text 
  171.                 for one page (page size - (header + footer),
  172.                 then fill in blank lines to complete the page.
  173.  
  174.     Setting options:        Enter 1 for yes or enter 0 for no.
  175.    *-**-***-*****-********-*************-*********************-**************...
  176.     Parameter:        Header size.
  177.     Default setting:        3.
  178.     
  179.     Description:        The header is the number of blank lines printed
  180.                 at the top of a page.  The default setting is
  181.                 3 lines, which equals 1/2 inch. This parameter 
  182.                 is used only if page brea